import record from './record';
import utils from './utils';
// import qs from 'qs';
export default _ => {
    let levels = ['log', 'info', 'dir', 'debug', 'error', 'warn'];
    for (let i = 0; i < levels.length; i++) {
        let level = console[levels[i]];
        window.console[levels[i]] = function() {
            let content = [];
            for(let i=0;i<arguments.length;i++){
                content.push(JSON.stringify(arguments[0]))
            }
            record.breadcrumbs.push({
                type: 'console.' + levels[i],
                url: location.href,
                time: utils.getTime(),
                content: content.join(',')
            })
            level.apply(this, arguments);
        }
    }

}